package com.uni.crawl.model.vo.crawl;

import com.uni.crawl.common.base.UserBaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import java.time.LocalDateTime;

/**
 * <p>
 * 爬虫实例
 * </p>
 *
 * @author JervisPG
 * @since 2023-12-16
 */
@Getter
@Setter
@ApiModel(value = "CrawlInstance对象", description = "爬虫实例")
public class CrawlInstanceVO extends UserBaseEntity {

    @ApiModelProperty("ID")
    private Long id;

    @ApiModelProperty("空间编码")
    private String nsCode;

    @ApiModelProperty("模板编码")
    private String tmplCode;

    @ApiModelProperty("开始时间")
    private LocalDateTime startTime;

    @ApiModelProperty("结束时间")
    private LocalDateTime endTime;

    @ApiModelProperty("实例状态。-1-失败；0-初始化；1-进行中；2-抓取成功；3-解析完成")
    private Integer instanceStatus;

    @ApiModelProperty("实例队列总数")
    private Integer queueTotal;

    @ApiModelProperty("实例队列完成数。不区分http状态码")
    private Integer queueFinish;

    @ApiModelProperty("失败原因")
    private String errorMsg;

    // 关联字段
    @ApiModelProperty("空间名称")
    private String nsName;

    @ApiModelProperty("模板名称")
    private String tmplName;

}
